package com.wnxy.parking.controller;


import com.wnxy.parking.common.result.Result;
import com.wnxy.parking.entity.Owner;
import com.wnxy.parking.service.IOwnerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Jet
 * @since 2023-08-19
 */
@RestController
@RequestMapping("/owner")
public class OwnerController {

    @Resource
    private IOwnerService ownerService;

    /**
     * 列表
     */
    @GetMapping("test")
    public Result<List<Owner>> test() {
        List<Owner> list = ownerService.list();
        return Result.ok(list);
    }

    /**
     * 列表
     */
    @GetMapping
    public Result<List<Owner>> findAll() {
        List<Owner> list = ownerService.list();
        return Result.ok(list);
    }
}

